package cn.wolfcode.p2p.business.service;

import java.util.List;

import com.github.pagehelper.PageInfo;

import cn.wolfcode.base.QueryObject;
import cn.wolfcode.p2p.business.domain.BidRequest;
import cn.wolfcode.p2p.business.domain.BidRequestAuditHistory;

public interface IBidRequestService {

    /**
     * 多条件过滤和分页查询
     *
     * @param qo 封装查询条件
     * @return
     */
	PageInfo<BidRequest> query(QueryObject qo);

    /**
     * 添加借款申请
     * @param vo
     */
    void applyBorrow(BidRequest vo);

    /**
     * 审核借款申请
     * @param bidRequestId 借款信息id
     * @param publishTime 发标时间
     * @param state 借款状态
     * @param remark 审核备注
     */
    void PublishAudit(Long bidRequestId, String publishTime, Integer state, String remark);

    BidRequest get(Long id);

    void update(BidRequest bidRequest);

    List<BidRequestAuditHistory> listAuditHistorysByBidRequestId(Long BidRequestId);

    /**
     * 获取招标中, 还款中, 已完成的前五条数据
     * @param number 
     * @return
     */
    List<BidRequest> listIndexBidRequest(int number);

    /**
     * 获取最近的5条待发布借款
     * @param number
     * @return
     */
    List<BidRequest> listUnPlushBideRequest(int number);

    /**
	 * 每隔一小时查询最近一个小时的发布的待发布借款
	 */
	void listUnPublishedRequestInOneHour();

	/**
	 * 每隔一分钟发布队列中当前小于或等于当前分钟的待发布借款
	 */
	void publishedBidRequestPreMinute();
    
    
    
    
    
    
    
    
    
    
    
}